package com.yyl.web.controller;

import com.yyl.entity.user;
import com.yyl.service.impl.userServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
public class userController {

	@Autowired
	userServiceImpl foo;

	@RequestMapping("getUserName")
	public Map<String,Object> getUserName() {
		Map<String,Object> map = new HashMap<String,Object>();
		List<user> users = foo.getAllUser();
		map.put("list",users);
		return map;
	}

}
